home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dfpp01.zip / CONTROL.CPP < prev    next >
C/C++ Source or Header  |  1992-11-10  |  865b  |  35 lines

  1. // ------------ control.cpp
  2.  
  3. #include "control.h"
  4. #include "desktop.h"
  5.  
  6. void Control::Keyboard(int key)
  7. {
  8.     DFWindow *Wnd;
  9.     switch (key)    {
  10.         case UP:
  11.             Wnd = desktop.InFocus();
  12.             do {
  13.                 PrevSiblingFocus();
  14.                 if (Wnd == desktop.InFocus())
  15.                     break;
  16.             } while (desktop.InFocus()->WindowType() == MenubarWindow);
  17.             break;
  18.         case '\t':
  19.         case DN:
  20.         case ALT_F6:
  21.             Wnd = desktop.InFocus();
  22.             do {
  23.                 NextSiblingFocus();
  24.                 if (Wnd == desktop.InFocus())
  25.                     break;
  26.             } while (desktop.InFocus()->WindowType() ==
  27.                     MenubarWindow);
  28.             break;
  29.         default:
  30.             DFWindow::Keyboard(key);
  31.             break;
  32.     }
  33. }
  34.  
  35.